[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Delete                   Deletes a Substring from a String

 Delete(var Source : <string>; Start,NumChars : Integer);                [TP]

    Deletes a substring of Source, starting at location Start and
    consisting of NumChars characters.

          Source    Any string variable.

           Start    An integer value; starting location in Source for
                    substring to be deleted; should be in the range
                    1..Length(Source).

        NumChars    An integer value; number of characters to be deleted;
                    should be in the range 1..(1+Length(Source)-Start)

          Notes:    If Start is not in the range 1..255, a runtime error
                    17 ($11) is generated.

                    If Start is greater than the length of the string, no
                    characters are removed from the string.

  -------------------------------- Example ---------------------------------

           Name := 'Rufus P. Jones';
           Delete(Name,7,3);        { delete middle initial, blank}

See Also: Insert Concat Copy
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson